dict1 = {
    'a': 1,
    'b': 2
}
print(dict1)
print(type(dict1)) # <class 'dict'>
item = dict1.pop('b') # 删除元素
print(item)
print(dict1)
dict1.clear()
print(dict1) # {}
dict1 = {
    'a': 1,
    'b': 2
}
keys = dict1.keys()
print('keys = ', keys, 'type', type(keys)) # dict_keys(['a', 'b'])  type <class 'dict_keys'>
# 遍历
# for ii in dict1.keys():  # 遍历keys
#     print(ii)
#     print(dict1[ii])
# # 遍历 字典 也行
#     for key in dict1:
#         print(key, dict1[key])